<!DOCTYPE html>
{% load staticfiles %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ title }}</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/reset.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/animate.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
    <script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/jquery-migrate-1.2.1.min.js' %}" type="text/javascript"></script>
    <style>
        #box1 {
            width: 600px;
            margin: 20px auto;
        }

        #box1 p {
            font-size: 20px;
            margin-bottom: 4px;
        }


    </style>
</head>
<body>
<section class="headerwrap ">
    <header>
        <div class=" header">

            {% if request.user.is_authenticated %}
                <div class="top">
                    <div class="wp">
                        <div class="fl"><p>服务电话：<b>15068895421</b></p></div>
                        <!--登录后跳转-->

                        <div class="personal">
                            <dl class="user fr">
                                <dd>{{ user.username }}<img class="down fr" src="/static/images/top_down.png"/></dd>
                                <dt><img width="20" height="20" src="{{ MEDIA_URL }}{{ user.image }}"/></dt>
                            </dl>
                            <div class="userdetail">
                                <dl>
                                    <dt><img width="80" height="80" src="{{ MEDIA_URL }}{{ user.image }}"/></dt>
                                    <dd>
                                        <h2>{{ user.nick_name }}</h2>
                                        <p>{{ user.username }}</p>
                                    </dd>
                                </dl>
                                <div class="btn">
                                    <a class="personcenter fl" href="{% url 'user_center' %}">进入个人中心</a>
                                    <a class="fr" href="{% url 'logout' %}">退出</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            {% else %}
                <div class="top">
                    <div class="wp">
                        <div class="fl"><p>服务电话：<b>15068895421</b></p></div>
                        <!--登录后跳转-->


                        <a style="color:white" class="fr registerbtn" href="{% url 'register' %}">注册</a>
                        <a style="color:white" class="fr loginbtn" href="{% url 'login' %}">登录</a>
                    </div>
                </div>
            {% endif %}
            <div class="middle">
                <div class="wp">
                    <a href="http://lxy.cjlu.edu.cn"><img class="fl" src="{% static 'images/lxy_logo.jpg' %}"/></a>

                </div>
            </div>


            <nav>
                <div class="nav">
                    <div class="wp">
                        <ul>
                            <li class="active"><a href="/">首页</a></li>
                            <li>
                                <a href="#">
                                    在线课程<img class="hot" src="{% static 'images/nav_hot.png' %}">
                                </a>
                            </li>
                            <li>
                                <a href="#">资料下载</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </nav>

        </div>
    </header>
</section>


<div id="box1">
    {% for i in papers %}
        <p>试卷名称：<a href="{% url 'paper' i.id %}">{{ i.course.name }}:{{ i.name }}</a></p>
    {% endfor %}
</div>


<footer>
    <div class="footer">
        <div class="wp">
            <ul class="cont">
                <li class="code"><img src="/static/images/code.jpg"/>
                    <p class="center">扫描关注微信</p></li>
                <li class="third"><img class="fl" src="/static/images/tell.png"/>
                    <p class="tell">15068895321</p>
                    <p class="time">周一至周日 9:00-0:30</p></li>
            </ul>

        </div>
        <p class="line"></p>
        <div class="wp clear">
            <span class="fl">2016-2017 <a href="https://www.cjluzzl.cn" style="color: #000">www.cjluzzl.cn</a> 中国计量大学理学院 Power by cjluzzl 保留所有权利</span>
            <span class="fr">copyright &copy; 2016 ICP备案证书号：浙ICP备16012186号-2</span>
        </div>
    </div>
</footer>

<script src="{% static 'js/selectUi.js' %}" type='text/javascript'></script>
<script src="{% static 'js/deco-common.js' %}" type='text/javascript'></script>
<script src="{% static 'js/plugins/laydate/laydate.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/layer/layer.js' %}"></script>
<script src="{% static 'js/plugins/queryCity/js/public.js' %}" type="text/javascript"></script>
<script src="{% static 'js/unslider.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/jquery.scrollLoading.js' %}" type="text/javascript"></script>
<script src="{% static 'js/deco-common.js' %}" type="text/javascript"></script>
<script type="text/javascript" src="{% static 'js/index.js' %}"></script>

</body>
</html>